<template>
	<view>
		购物车
	</view>
</template>

<script>
	import {createNamespacedHelpers} from 'vuex'
	const {mapState:mapUserState}=createNamespacedHelpers('user')
	export default {
		data() {
			return {
				
			}
		},
		computed:{
			...mapUserState(['authToken','userInfo'])
		},
		methods: {
			async getSafe(){
				const uid=this.userInfo.uid;
				const auth_token=this.authToken;
				const result=await uni.$api.mine.safeApi({uid,auth_token})
				console.log('aa',result);
				if(!result.data.status){
					uni.navigateTo({
						url:'/pages/login/login'
					})
				}
			}
		},
		onShow() {
			this.getSafe()
		}
	}
</script>

<style>

</style>
